import request from '@/utils/request'

// 费项列表
export function bmsBaseFeeItemList(data, query) {
  return request({
    url: '/wms/bmsBaseFeeItem/list',
    method: 'post',
    data: data,
    params: query
  })
}
// 新增费项
export function addBmsBaseFeeItem(data) {
  return request({
    url: '/wms/bmsBaseFeeItem',
    method: 'post',
    data: data
  })
}
// 费项详情
export function bmsBaseFeeItemById(id) {
  return request({
    url: '/wms/bmsBaseFeeItem/' + id,
    method: 'get'
  })
}
// 修改费项
export function updateBmsBaseFeeItem(data) {
  return request({
    url: '/wms/bmsBaseFeeItem',
    method: 'put',
    data: data
  })
}
// 删除费项
export function delBmsBaseFeeItem(id) {
  return request({
    url: '/wms/bmsBaseFeeItem/' + id,
    method: 'delete'
  })
}
// 导出费项
export function exportBmsBaseFeeItem(query) {
  return request({
    url: '/wms/bmsBaseFeeItem/export',
    method: 'get',
    params: query
  })
}
// 账单列表
export function bmsBillList(data, query) {
  return request({
    url: '/wms/bmsBill/bmsBillList',
    method: 'post',
    data: data,
    params: query
  })
}
// 新增账单
export function addBmsBill(data) {
  return request({
    url: '/wms/bmsBill/createBill',
    method: 'post',
    data: data
  })
}
// 修改账单
export function updateBmsBill(data) {
  return request({
    url: '/wms/bmsBill',
    method: 'put',
    data: data
  })
}
// 账单详情
export function bmsBillById(id) {
  return request({
    url: '/wms/bmsBill/' + id,
    method: 'get'
  })
}
// 删除账单
export function delBmsBill(id) {
  return request({
    url: '/wms/bmsBill/' + id,
    method: 'delete'
  })
}
// 财务单生成账单
export function createBill(data) {
  return request({
    url: '/wms/bmsBill/bmsBill',
    method: 'post',
    data: data
  })
}
// 导出账单
export function exportBill(query) {
  return request({
    url: '/wms/bmsBill/export',
    method: 'get',
    params: query
  })
}

// 账单明细列表
export function bmsBillDetail(data, query) {
  return request({
    url: '/wms/bmsBillDetail/detail',
    method: 'post',
    data: data,
    params: query
  })
}
// 新增账单明细
export function addBmsBillDetail(data) {
  return request({
    url: '/wms/bmsBillDetail',
    method: 'post',
    data: data
  })
}
// 修改账单明细
export function updateBmsBillDetail(data) {
  return request({
    url: '/wms/bmsBillDetail',
    method: 'put',
    data: data
  })
}
// 账单明细详情
export function bmsBillDetailById(id) {
  return request({
    url: '/wms/bmsBillDetail/' + id,
    method: 'get'
  })
}
// 删除账单明细
export function delBmsBillDetail(id) {
  return request({
    url: '/wms/bmsBillDetail/' + id,
    method: 'delete'
  })
}
// 导出账单明细
export function exportBillDetail(query) {
  return request({
    url: '/wms/bmsBillDetail/export',
    method: 'get',
    params: query
  })
}

// 财务单列表
export function bmsFinanceList(data, query) {
  return request({
    url: '/wms/bmsFinance/list',
    method: 'post',
    data: data,
    params: query
  })
}
// 修改财务单
export function updateBmsFinance(data) {
  return request({
    url: '/wms/bmsFinance',
    method: 'put',
    data: data
  })
}
// 财务单详情
export function bmsFinanceById(id) {
  return request({
    url: '/wms/bmsFinance/' + id,
    method: 'get'
  })
}
// 删除财务单
export function delBmsFinance(id) {
  return request({
    url: '/wms/bmsFinance/' + id,
    method: 'delete'
  })
}
// 导出财务单列表
export function exportBmsFinance(query) {
  return request({
    url: '/wms/bmsFinance/export',
    method: 'get',
    params: query
  })
}
// 进出纳统计根据登录人区分
export function summaryList(query, pageReq) {
  return request({
    url: '/wms/bmsFinance/summaryList',
    method: 'post',
    data: query,
    params: pageReq
  })
}
// 新增收款
export function addPayInfo(data) {
  return request({
    url: '/wms/bmsFinance/addPayInfo',
    method: 'post',
    data: data
  })
}
// 新增付款
export function addReceivaInfo(data) {
  return request({
    url: '/wms/bmsFinance/addReceivaInfo',
    method: 'post',
    data: data
  })
}

// 财务单明细列表
export function bmsFinanceDetail(data, query) {
  return request({
    url: '/wms/bmsFinanceDetail/list',
    method: 'post',
    data: data,
    params: query
  })
}
// 新增财务单明细
export function addBmsFinanceDetail(data) {
  return request({
    url: '/wms/bmsFinanceDetail',
    method: 'post',
    data: data
  })
}
// 修改财务单明细
export function updateBmsFinanceDetail(data) {
  return request({
    url: '/wms/bmsFinanceDetail',
    method: 'put',
    data: data
  })
}
// 财务单明细详情
export function bmsBmsFinanceDetailById(id) {
  return request({
    url: '/wms/bmsFinanceDetail/' + id,
    method: 'get'
  })
}
// 删除财务单明细
export function delBmsFinanceDetail(id) {
  return request({
    url: '/wms/bmsFinanceDetail/' + id,
    method: 'delete'
  })
}
// 导出财务单明细
export function exportBmsFinanceDetail(query) {
  return request({
    url: '/wms/bmsFinanceDetail/export',
    method: 'get',
    params: query
  })
}
// 获取YT主账号id
export function getYT(data) {
  return request({
    url: '/wms/customer/getYT ',
    method: 'get',
    data: data
  })
}

// 修改银行账号
export function editEeAccount(data) {
  return request({
    url: '/wms/eeAccount',
    method: 'put',
    data: data
  })
}

// 新增银行账号
export function addEeAccount(data) {
  return request({
    url: '/wms/eeAccount',
    method: 'post',
    data: data
  })
}

// 获取银行账号详情
export function getEeAccountById(id) {
  return request({
    url: '/wms/eeAccount/' + id,
    method: 'get'
  })
}

// 删除银行账号
export function delEeAccount(id) {
  return request({
    url: '/wms/eeAccount/' + id,
    method: 'delete'
  })
}

// 导出银行账号
export function exportEeAccount(query) {
  return request({
    url: '/wms/eeAccount/export',
    method: 'get',
    params: query
  })
}

// 银行账号列表
export function eeAccountList(data, query) {
  return request({
    url: '/wms/eeAccount/list',
    method: 'post',
    data: data,
    params: query
  })
}

// 销账
export function writeOff(data) {
  return request({
    url: '/wms/bmsBill/writeOff',
    method: 'post',
    data: data
  })
}

//废弃
export function discardBill(data) {
  return request({
    url: '/wms/bmsBill/discardBill',
    method: 'post',
    data: data
  })
}